<?php
namespace Wechat\Model;
use Think\Model\RelationModel;
class ItemModel extends RelationModel {
	
	protected $_link = array(
		/*
		'type'=>array(
			'mapping_type'      => self::BELONGS_TO,
			'class_name'        => 'type',
			'foreign_key'		=> 'typeid',
			'mapping_fields'	=> 'name',
			'as_fields'			=> 'name:type',
			
		),
		'image' => array(
			'mapping_type'      => self::HAS_MANY,
			'class_name'        => 'images',
			'foreign_key'   => 'sid',
			'mapping_fields' => 'url',
		),
		*/
		'join' => array(
			'mapping_type'      => self::HAS_MANY,
			'class_name'        => 'join',
			'foreign_key'   => 'action',
			'as_fields'			=> 'action:action',
			//'mapping_fields' => 'url',
		),
		
	);
	
}